<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/WEB-INF/jsp/include.jsp" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<html>
<script language="javascript">
	function submitForm() {
		document.getElementById("createUser").submit();
	}
</script>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title><fmt:message key="register"/></title>

<style>
    .error { color: red; }
</style>
  
</head>
<body>
<table border="1" align="center" width="100%">
	<tr>
		<td width="15%"></td>
		<td width="70%"></td>
		<td width="15%"></td>
	</tr>
	<tr>
		<td width="15%"></td>
		<td width="70%">
			<form:form method="post" commandName="createUser">
			<table border="1" align="center" width="60%">
				<tr><td><fmt:message key="title"/></td></tr>
				<tr>
					<td>
						<table border="1">
							<tr>
								<td colspan="2">
								<form:errors cssClass="error" path="userName"/>
								<form:errors cssClass="error" path="password"/>
								<form:errors cssClass="error" path="confirmPwd"/>
								<form:errors cssClass="error" path="email"/>
								<form:errors cssClass="error" path="confirmEmail"/>
								</td>
							</tr>
							<tr>
								<td><fmt:message key="enter-username"/></td>
								<td><form:input path="userName"/></td>
							</tr>
							<tr>
								<td><fmt:message key="enter-password"/></td>
								<td><form:password path="password"/></td>
							</tr>
							<tr>
								<td><fmt:message key="confirm-password"/></td>
								<td><form:password path="confirmPwd"/></td>
							</tr>
							<tr>
								<td><fmt:message key="enter-email"/></td>
								<td><form:input path="email"/></td>
							</tr>
							<tr>
								<td><fmt:message key="confirm-email"/></td>
								<td><form:input path="confirmEmail"/></td>
							</tr>
							<tr>
								<td colspan="2">
									<table>
										<tr>
											<td>
												<a href="javascript:submitForm();">Register</a>
												<a href="<c:url value="home.htm"/>">Cancel</a>
											</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			</form:form>
		</td>
		<td width="15%"></td>
	</tr>
	<tr>
		<td width="15%"></td>
		<td width="70%"></td>
		<td width="15%"></td>
	</tr>
</table>
</body>
</html>